//
//  OrderListController.m
//  ios-supplier
//
//  Created by feynmanyuan on 15/4/15.
//  Copyright (c) 2015年 feynmanyuan. All rights reserved.
//

#import "OrderDetailController.h"
#import "OrderListController.h"
#import "OrderListProxy.h"
#import "CompleteOrderListProxy.h"
#import "RefuseOrderListProxy.h"
#import "JFBOrderDS.h"
#import "JFBStoreInfoDS.h"
#define screen_Width [UIScreen mainScreen].bounds.size.width
#define screen_Height [UIScreen mainScreen].bounds.size.height
@interface OrderListController ()<UIAlertViewDelegate,UIGestureRecognizerDelegate>
@property (nonatomic, strong) UISegmentedControl * segment;
@property (nonatomic, strong) UIScrollView * scrollView;
@property (nonatomic, strong) NSMutableDictionary *proxyDictionary;
@property (nonatomic, strong) OrderListProxy *currentProxy;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *openStatusItem;

@property (nonatomic, strong) JFBStoreInfoDS *storeInfo;
@property (nonatomic, strong) NSDictionary * currentNotificationInfo;
- (IBAction)operatingAction:(id)sender;

@end

@implementation OrderListController
-(void)viewWillAppear:(BOOL)animated{
    UIView *statusBackView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, screen_Width, 20)];
    statusBackView.backgroundColor = UIColorFromRGB(0xfc381e);
    [self.view addSubview:statusBackView];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
}

-(UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatWebView];
    self.navigationController.navigationBar.hidden = YES;
}

#pragma mark -创建webView
-(void)creatWebView{
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, screen_Width, screen_Height-44)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/back-order/queryOrderList.do?ut=%@&type=1",API_HOST,[[NSUserDefaults standardUserDefaults] objectForKey:@"ut"]]]];
//    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"www.baidu.com"]];
    NSLog(@",,,,,,,,,,,,,,,,,,,,,,%@",request);
    webView.scalesPageToFit = YES;
    [webView loadRequest:request];
    [self.view addSubview:webView];
    for (id subViews in webView.subviews) {
        if ([[subViews class] isSubclassOfClass:[UIScrollView class]]) {
            ((UIScrollView *)subViews).bounces = NO;
        }
    }
}
@end
